package com.thought.wxsession.config;

import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component		// 声明该类被spring管理
@ConfigurationProperties(prefix = "config.wxcp")
@Setter     // 注意：必须有setter方法才能赋值成功
@Slf4j
public class WxCpPropertiesConstantsUtils implements InitializingBean {
    private String corpId;
    private String secret;

    public static String Wxcp_corpId;
    public static String Wxcp_secret;


    @Override
    public void afterPropertiesSet() throws Exception {
        Wxcp_corpId = corpId;
        Wxcp_secret = secret;
    }
}
